package com.javastudy.forum.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel("用户类")
public class User {
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    @JsonIgnore
    private String password;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("手机号")
    private String phonenum;

    @ApiModelProperty("邮箱地址")
    private String email;

    @ApiModelProperty("性别")
    private Byte gender;

    @ApiModelProperty("盐")
    @JsonIgnore
    private String salt;

    @ApiModelProperty("头像地址")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private String avatarurl;

    @ApiModelProperty("文章数")
    private Integer articlecount;

    @ApiModelProperty("是否管理员")
    private Byte isadmin;

    @ApiModelProperty("个人简介")
    private String remark;

    @ApiModelProperty("状态")
    private Byte state;

    @ApiModelProperty("删除状态")
    @JsonIgnore
    private Byte deletestate;

    @ApiModelProperty("创建时间")
    private Date createtime;

    @ApiModelProperty("更新时间")
    private Date updatetime;


}